from zhoukao3_114.Page import Page
from selenium import webdriver
import pytest
from time import sleep
from zhoukao3_114.Page2 import Page2

@pytest.fixture()
def driver():
    driver=webdriver.Chrome()
    driver.maximize_window()
    yield driver
    driver.close()

def test_login(driver):
    po1=Page(driver)
    po1.open_url('https://www.jiuxian.com/')
    sleep(2)
    po1.please_login()
    sleep(2)
    po1.send_usepow()
    sleep(7)
    po1.button_login()
    sleep(2)
    po1.login_quedin()
    sleep(5)

def test_01(driver):
    test_login(driver)
    po2=Page2(driver)
    sleep(2)
    po2.send_shuru()
    sleep(2)
    po2.click_sousuo()
    sleep(5)
    po2.jieping()
    print(po2.dy)

